<extend name="Public/base"/>

<block name="body">

  <!-- 标题栏 -->
  <div class="main-title">
        <include file="Zuopin@Admin/_top_nav"/>
  </div>
            <div  class="with-padding">
                <div class="fl">
                 <h4 style="color:#5A81C8">&nbsp;&nbsp;<i class="icon icon-user"></i>&nbsp;&nbsp;学生成绩汇总&nbsp;</h4> 
                    <form method='post' id="form1" action="{:U('')}" class="form-horizontal form-condensed">
                      <div class="form-group">
                       <div class="col-md-5">
                           <div class="input-group">
                              <span class="input-group-addon fix-padding">班级</span>                             
                                      <select name="bj_code" id="bj_code" class="form-control" onchange="this.form.submit()">
                                      <volist name="classlist" id="v">
                                      <option value="{$v.bj_code}" <if condition="$map['bj_code'] eq $v['bj_code']">selected</if> >{$v.bj_name}</option>
                                      </volist> 
                                      </select> 
                              <span class="input-group-addon fix-border fix-padding">学生姓名</span>
                               <input type="text" class="form-control" name="st_name" value="{$st_name}" placeholder="输入姓名查询">
                              <span class="input-group-btn">
                                <button class="btn btn-primary" type="submit">&nbsp;查询&nbsp;</button>
                              </span>
                            </div>
                        </div>
                       </div>
                    </form> 

                  
                </div>

            </div>




        <div class="with-padding">
        <div class="common_block_border">

 


    <!-- 数据列表 -->
     <div class="right_box">

     <form method="post" action="{:U('countScore')}" name="studentScore" class="form-inline form-condensed">
        <div class="data-table">
         <table class="table table-bordered table-striped">
             <thead>
            <tr class="success text-center">
                <th><input id="check-all" class="check-all" type="checkbox"/>全选</th>             
                <th>序号</th>                
                <th>班级</th>                        
                <th>学号</th>
                <th class="text-center">姓名</th>                
                <th>性别</th>
                <th class="success text-center">成绩</th>
                <th>最近登录时间</th>
                <th>登录IP</th>                
                <th>操  作</th>
            </tr>
            </thead>
    
            <tbody>          
                <volist name="datalist" id="vo">
                <tr>                    
                    <td><input class="ids" type="checkbox" value="{$vo.uid}" name="ids[]"> </td>
                    <td>{$i}</td>                   
                    <td><a title="{$vo.bj_code}">{$vo.bj_code|get_bjname}</a></td>
                    
                    <td>{$vo.st_code}</td>
                    <td class="text-center">{$vo.st_name}</td>
                    <td class="text-center">{$vo.sex|get_sex}</td> 
                    <td class="text-center">
                    <input type='tetx' name=name="data[{$i}][score]" value="{$vo.score}" class="form-control text-center" style="width:60px;">
                   
                    </td>       
                    <td>
                    {$vo.last_login_time|date='Y-m-d H:i',###}
                    </td>
                    <td>{$vo.last_login_ip|long2ip}
                    </td>                        
                    <td>
                    <if condition="($vo.sid eq 0)">
                    <a href="{:U('Score/edit','sid='.$vo['sid'])}" >编辑</a>|删除
                    <else/>
                        <a href="{:U('Score/edit','sid='.$vo['sid'])}" >编辑</a> |                        
                        <a href="{:U('Student/delete?id='.$vo['sid'])}" class="authorize">删除</a>
                    </if>                        
                    </td>
                        <input type="hidden" name="data[{$i}][uid]" value="{$vo.sid}" >
                        <input type="hidden" name="data[{$i}][sex]" value="{$vo.sex}" >
                        <input type="hidden" name="data[{$i}][term]" value="{:C('CUR_TERM')}" >
                        <input type="hidden" name="data[{$i}][oscore]" value="{$vo.score}" >
                        <input type="hidden" name="data[{$i}][bj_name]" value="{:get_bjname($vo['bj_code'])}" >
                        <input type="hidden" name="data[{$i}][bj_code]" value="{$vo.bj_code}" >
                        <input type="hidden" name="data[{$i}][st_code]" value="{$vo.st_code}" >
                        <input type="hidden" name="data[{$i}][st_name]" value="{$vo.st_name}" >
                        <input type="hidden" name="data[{$i}][subject]" value="{$aarray['subject']}" >
                </tr>
                </volist>
                
            </tbody>
            </table>  
        </div>

       <div class="right_box" style="height:50px;">
          <div class="col-md-2">
          <input type="hidden" name="subject" value="{$aarray['subject']}" >
          <input type="hidden" name="bj_code" value="{$aarray['bj_code']}" >
          <button type="submit" class="btn btn-success">统计成绩</button>
         
          </div>
           
        </div>
        
        </form>
           
    </div>
    </div>

    <script>
       $(".check-all").on('click',function() {
            $(".ids").prop("checked", this.checked); 
           // $("input[name='id[]']").prop("checked", this.checked);  
      });  
         l
      // $("input[name='id']").on('click',function() {  
      //       var $subs = $("input[name='id[]']");  
      //       $("#all").prop("checked" , $subs.length == $id.filter(":checked").length ? true :false);  
      // });

     </script>

   </block>

